<template>
	<view class="ikz-detail">
    <ikz-loading  :css-data="loading_css"></ikz-loading>
    <view class="ikz-help">
      <view class='ikz-help-item ikz-afters' v-for="(item,index) in help_data" :key="index" @click="goDetail(item.id,item.title)">
        <view class="ikz-help-title ">
          {{item.title}}
        </view>
      </view>
    </view>
	</view>
</template>

<script>
import ikzLoading from '@/pages/Component/Public/Loading/loading.vue';
var app = getApp();
import ikz from '@/pages/Common/tools.js';
export default {
	components: {
    ikzLoading
	},
	data() {
		return {
      help_data:[],
      loading_css:{
        display:'flex',
      },
      
    };
	},
  onLoad() {
    this.helpInfo((res)=>{
      this.loading_css.display = 'none';
    });
  },
	methods: {
		//请求页面数据
		helpInfo(fn) {
			var path = '/xyb/same/help_center_list';
			var data = {
			};
			ikz.post(path, data, res => {
				if (res.data.code) {
					this.help_data = res.data.data.data
          this.$forceUpdate();
				} else {
					uni.showModal({
						title: '提示',
						content: res.data.data,
						showCancel: false,
						success: function(res) {}
					});
				}
        fn();
				// if(that.pull_status){
				// 	this.$emit("change",'pull');
				// }
			});
		},
    goDetail(id,title){
      uni.navigateTo({
        url:'../detail/index?id='+id+'&title='+title
      })
    },
    
	}
};
</script>

<style>
  page{
    width: 100%;
    height: 100%;
    background:#F3F3F3;
  }
 .ikz-help {
   box-sizing: border-box;
   padding: 10px 20px;
   width: 90%;
   margin: 10px auto 0;
   background: #fff;
   border-radius:6px;
   z-index: 99;
   line-height: 40px;
   font-size: 15px;
 }
 .ikz-help-item{
   display: flex;
   align-items: center;
   justify-content: space-between;
 }
 
 .ikz-afters {
   position: relative;
 }
 
 .ikz-afters:after {
   content: " ";
   display: inline-block;
   height: 6px;
   width: 6px;
   border-width: 2px 2px 0 0;
   border-color: #888;
   border-style: solid;
   -webkit-transform: matrix(0.71, 0.71, -.71, 0.71, 0, 0);
   transform: matrix(0.71, 0.71, -.71, 0.71, 0, 0);
   top: -2px;
   position: absolute;
   top: 50%;
   margin-top: -4px;
   right: 10px;
 }
</style>
